package com.meowcook.exception;

import com.meowcook.common.AppResult;
import lombok.Getter;

/**
 * 自定义异常
 */
@Getter
public class AppException extends RuntimeException{

    private AppResult<Object> errorResult;

    public AppException() {
        super();
    }
    public AppException(AppResult<Object> errorResult) {
        super(errorResult.getMessage());
        this.errorResult = errorResult;
    }

    public AppException(String message) {
        super(message);
    }

    public AppException(String message, Throwable cause) {
        super(message, cause);
    }

    public AppException(Throwable cause) {
        super(cause);
    }

}
